﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Settings.aspx.cs" Inherits="RecruitingApplication.Admin.Settings" %>
<%@ Register Src="~/Controls/Settings/SettingsSortable.ascx" TagPrefix="SS" TagName="SettingsSortable" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">

    <script type="text/javascript" src="<%= ResolveUrl("~/Scripts/JQUI/jquery.ui.tabs.js") %>" ></script>
    <script type="text/javascript" src="<%= ResolveUrl("~/Scripts/JQUI/jquery.ui.sortable.js") %>" ></script>
    <script type="text/javascript" src="<%= ResolveUrl("~/Scripts/JQUI/jquery.ui.button.js") %>" ></script>
    <script type="text/javascript" src="<%= ResolveUrl("~/Scripts/Settings.js") %>" ></script>
    <link href="../Styles/Settings.css" rel="stylesheet" type="text/css" />

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="SettingsTabs">
	    <ul>
		    <li><a href="#tabs-states">States</a></li>
		    <li><a href="#tabs-users">Users</a></li>
            <li><a href="#tabs-positions">Positions</a></li>
            <li><a href="#tabs-heardabouts">Heard Abouts</a></li>
            <li><a href="#tabs-categories">Document Categories</a></li>
	    </ul>
	    <div id="tabs-states">
		    <ul id="SortableStates" class="SettingsList">
                <asp:ListView runat="server" ID="StatesRepeater">
                    <ItemTemplate>
                        <SS:SettingsSortable Type="State" OnDeleteFunction="DeleteState" IsSortable="true" MainID='<%# Eval("ID") %>' InputValue='<%# Eval("Name") %>' runat="server" />
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <div class="ui-state-highlight">
                            <table>
                                <tr>
                                    <td>
                                        <span class="ui-icon ui-icon-alert"></span>
                                    </td>
                                    <td>
                                        <span>There are currently no states.</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </EmptyDataTemplate>
                </asp:ListView>
            </ul>
            <ul id="SortableStatesEmpties" class="ui-helper-hidden">
                <% for (int i = 0; i < 10; i++)
                   { %>
                    <SS:SettingsSortable Type="State"  OnDeleteFunction="DeleteState" IsSortable="true" MainID='' InputValue='' runat="server" />
                <% } %>
            </ul>
            <div class="ui-widget" style="margin-left:15px;margin-top:10px;">
                <input id="NewStateControl" size="50" type="text" title="Type name and press enter to add new" class="WatermarkInput ui-widget-content ui-corner-all" /> 
            </div>
        </div>
	    <div id="tabs-users">
		</div>
        <div id="tabs-positions">
            <ul id="SettingsPositions" class="SettingsList">
                <asp:ListView runat="server" ID="PositionsRepeater">
                    <ItemTemplate>
                        <SS:SettingsSortable OnDeleteFunction="DeletePosition" Type="Position" IsSortable="false" MainID='<%# Eval("ID") %>' InputValue='<%# Eval("Name") %>' runat="server" />
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <div class="ui-state-highlight">
                            <table>
                                <tr>
                                    <td>
                                        <span class="ui-icon ui-icon-alert"></span>
                                    </td>
                                    <td>
                                        <span>There are currently no positions.</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </EmptyDataTemplate>
                </asp:ListView>
            </ul>
            <ul id="SettingsPositionsEmpties" class="ui-helper-hidden">
                <% for (int i = 0; i < 10; i++)
                   { %>
                    <SS:SettingsSortable Type="Position"  OnDeleteFunction="DeletePosition" IsSortable="false" MainID='' InputValue='' runat="server" />
                <% } %>
            </ul>
            <div class="ui-widget" style="margin-left:0px;margin-top:5px;">
                <input id="NewPositionControl" size="50" type="text" title="Type name and press enter to add new" class="WatermarkInput ui-widget-content ui-corner-all" /> 
            </div>
        </div>
        <div id="tabs-heardabouts">
            <ul id="SettingsHeardAbouts" class="SettingsList">
                <asp:ListView runat="server" ID="HeardAboutsRepeater">
                    <ItemTemplate>
                        <SS:SettingsSortable OnDeleteFunction="DeleteHeardAbout" Type="HeardAbout" IsSortable="false" MainID='<%# Eval("ID") %>' InputValue='<%# Eval("Name") %>' runat="server" />
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <div class="ui-state-highlight">
                            <table>
                                <tr>
                                    <td>
                                        <span class="ui-icon ui-icon-alert"></span>
                                    </td>
                                    <td>
                                        <span>There are currently no positions.</span>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </EmptyDataTemplate>
                </asp:ListView>
            </ul>
            <ul id="SettingsHeardAboutsEmpties" class="ui-helper-hidden">
                <% for (int i = 0; i < 10; i++)
                   { %>
                    <SS:SettingsSortable Type="HeardAbout"  OnDeleteFunction="DeleteHeardAbout" IsSortable="false" MainID='' InputValue='' runat="server" />
                <% } %>
            </ul>
            <div class="ui-widget" style="margin-left:0px;margin-top:5px;">
                <input id="NewHeardAboutControl" size="50" type="text" title="Type name and press enter to add new" class="WatermarkInput ui-widget-content ui-corner-all" /> 
            </div>
        </div>
        <div id="tabs-categories">
        </div>
    </div>
</asp:Content>
